-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Higuera-Cary pusher #3280
Add Higuera-Cary pusher #3280
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- A minor typo in @aroeszler name.
- some question regrading naming
- could you please add a comment in the pusher implementation to highlight where the floating point precision becomes an issue so that your solution is documented
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @aroeszler and @steindev ! Just some small suggestions above on code style.
I asked @psychocoderHPC and he trusts our reviews of this PR. So I assume you did not plan to add anything more to this PR @steindev and we can press the merge button now? |
Squash and merge probably, but YES you can do so. From my point of view everything is fine. Once we change the default pusher in a separate PR I will add a magnetic bottle test as suggested by @BeyondEspresso. |
Add Higuera-Cary pusher as presented in doi:10.1063/1.4979989.
The HC method is 2nd order, structure preserving, and relativistically correct.
Compared to Vay's method, the HC method has the additional property of being structure preserving while it correctly calculates the velocity in ExB direction when E·B=0 in contrast to Boris' method.
A correction to the formulas given in the original article is applied as documented by the WarpX team: (ECP-WarpX/WarpX#320).
Further references:
Tests performed so far
Single particle acceleration in constant electric field
Single particle turning circles in a constant magnetic field
Single particle movement with constant velocity in a force-free field composed of constant magnetic and electric fields
HC performs better than Boris, but the deviation from the expected straight line motion is still large.Only Vay produces the expected result, but it was Vay's design goal to reproduce the correct behavior truthfully.
HC's issue arises mainly due to insufficient precision of the input values (i.e. fields), as it relies on the cancellation of two very large equal but opposite numbers when calculating the new momentum, in this test case.
precisionCast
s and finally figured how to reduce errors due to upcasting while calculating with the necessary high precision, too.The HC pusher now performs as good as the Vay pusher and reproduces the trajectory.
(Therefore, I would like to spare discussions on that)
Kelvin-Helmholtz instability
Note, this picture amplifies the real difference. White pixels just mark that there is a change in that pixel, but not how large it is. Drawing the absolute difference in electron distributions results in a black void only.
To Do
species.param
in all examplesBig THANKS to @aroeszler who implemented most of the method.
This will close #2589.